<template>
	<view>
		<view class="my-search-container" :style="{'background-color' : bgcolor }" @click="searchBoxHandle">
      <view class="my-search-box" :style="{ 'border-radius': radius + 'px' }">
        <uni-icons type="search" size="30"></uni-icons>
        <text class="placeholder">搜索</text>
      </view>
    </view>
	</view>
</template>

<script>
	export default {
    props:{
      bgcolor:{
        type: String,
        default: '#C00000'
      },
      radius: {
        type: Number,
        default: 18 // px
      }
    },
		data() {
			return {
				
			};
		},
    methods:{
      searchBoxHandle() {
        this.$emit('click')
      }
    }
	}
</script>

<style lang="scss">
.my-search-container{
  height: 50px;
  // background-color: #C00000;
  display: flex;
  align-items: center;
  padding: 0 15px;
  .my-search-box{
    height: 36px;
    width: 100%;
    // border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #FFFFFF;
    .placeholder{
      font-size: 15px;
      margin-left: 10px;
    }
  }
}
</style>
